

$(document).ready(function(){

	if ( $("#post_login").length > 0 ) {
		 $("#post_login").attr("checked",true);
		 $("#post_login").attr("value","0");
		 $("#post_anonym").attr("value","1");
	}

     
   $("#vbox").hide();  
   
   $("#vcode").click(function(){
    
    refresh_vcode( edp_domain_url + 'vcode');
    $("#vbox").show();  
      
   });          

});

function check_validation()
{
	if( Login( GetFormSubmitEvent($("#addResponseForm")[0]) )== false )
		return false;
	
	if( $("#response").val().trim() == "" )
	{
		alert( "回应不能为空!" );
		return false;
	}
	
	if( $("#vcode").val().trim() == "" )
	{
		alert( "验证码不能为空!" );
		return false;
	}
	
}


function refresh_vcode(url){
 
   $("#vimg").attr('src',url);
 
}

 $(document).ready(function(){
	$(".white_box img").each(function(){
		var width = 680;
		var image = $(this);
		
	    if(image.width()>width){
	     image.width(width);
	     image.height(width/image.width()*image.height());
	    }   
	});
});	

